
#include "stdafx.h"
#include "FlightContext.h"
#include "Strategy.h"


FlightContext::FlightContext( Strategy *pStrategy )
	: m_pStrategy(pStrategy),m_resultPathList(NULL)
{

}

FlightContext::~FlightContext()
{
	delete m_pStrategy;
	m_pStrategy = NULL;
}

void FlightContext::FlightContextInterface()
{
	m_pStrategy->AlgorithmOperation(m_pFlightParameters, m_pDeterrent, m_pGeographyGrid, m_resultPathList);
}

Deterrent* FlightContext::CreateDeterrent( Deterrent &det )
{
	return &det;
}

GeographyGrid* FlightContext::CreateGeographyGrid( GeographyGrid &grid )
{
	return &grid;
}

FlightParameters* FlightContext::CreateFlightParameters( FlightParameters &fp )
{
	return &fp;
}
